/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package crawler.impl;

import crawler.common.HTMLUtil;
import crawler.itf.PostParserItf;
import org.jsoup.nodes.Document;

/**
 *
 * @author LT
 */
public class StaticCrawlerImpl {

    public static String crawlImage(PostParserItf parser, Document doc ,String url) {
        //TODO: xac dinh ten database, ten table va ten thu muc se luu
        //TODO: kiem tra trong table do co url nay chua, co roi bo qua
        //TODO: neu chua co thi generate file local tuong ung (bao gom ca thu muc se luu)
        //TODO: download file theo URL ve luu local theo dung ten da dat
        url = HTMLUtil.toAbsoluteURL(url, doc.baseUri());
        return url;
    }
}
